Apple, the Apple logo, and Macintosh are registered trademarks of Apple Computer, Inc.
Mac and OpenDoc are trademarks of Apple Computer, Inc.
Introduction
The second item in the OpenDoc “Document” menu is “Open” which a user chooses if they want to open a selected part into a window. This recipe serves as sample code to do this.
Caveats
• This code contains only the essence of the functionality of the Open command
• It does not contain proper error checking
• It does not account for the case where a part may want to allow “opening” of native content into separate windows.
• This sample uses a private field fTCSelection which keeps track of the selection in a part specific manner. For simplicity’s sake, we assume fTCSelection is an object which supports a few boolean methods regarding the nature of the selection, and supports iterating through the currently selected frames.